package o2o.dao.VO.sys;

public class SysSettingVO  implements Comparable<SysSettingVO> {
    private String name;    //配置项名称
    private String code;    //配置项名称
    private String val;      //系统配置值
    private String valInfo;  //存储val中的值，用,隔开
    private String descs;   //配置描述
    private String note;   //配置描述
    private String categoryCode;      //分类编码
    private int isShow;//是否前台显示  1显示  0不显示
    private long createTime;


    public String getValInfo() {
        return valInfo;
    }

    public void setValInfo(String valInfo) {
        this.valInfo = valInfo;
    }

    public String getCategoryCode() {
        return categoryCode;
    }

    public void setCategoryCode(String categoryCode) {
        this.categoryCode = categoryCode;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(int isShow) {
        this.isShow = isShow;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescs() {
        return descs;
    }

    public void setDescs(String descs) {
        this.descs = descs;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getVal() {
        return val;
    }

    public void setVal(String val) {
        this.val = val;
    }


    @Override
    public int compareTo(SysSettingVO o) {  //重写Comparable接口的compareTo方法，降序
        // 先按isShow排序
        if (this.isShow > o.getIsShow()) {
            return  (o.getIsShow() - this.isShow);
        }
        if (this.isShow < o.getIsShow()) {
            return  (o.getIsShow() - this.isShow);
        }
        // 按name排序
        if (this.descs.compareTo(o.getDescs()) > 0) {
            return 1;
        }
        if (this.descs.compareTo(o.getDescs()) < 0) {
            return -1;
        }
        return 0;
    }
}
